]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
folderView: Center folder icon
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 11 Nov 2019 21:07:19 +0000 (18:07 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 11 Nov 2019 21:12:32 +0000 (18:12 -0300)
The FolderView class is responsible for creating the 4-item
grid of the folder icon, with the preview of the first four
apps inside the folder.

However, with the deprecation of StAlign as child properties,
the folder icon stopped being horizontally centralized.

Center the folder icon horizontally again.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/817

js/ui/appDisplay.js

index 98bd5ec9682288fbebaed53214cef6cceccf1051..9a7b6452148940cd05e2c77f9bdf36f3850e6cf8 100644 (file)
@@ -1305,8 +1305,11 @@ class FolderView extends BaseAppView {
 
     createFolderIcon(size) {
         let layout = new Clutter.GridLayout();
-        let icon = new St.Widget({ layout_manager: layout,
-                                   style_class: 'app-folder-icon' });
+        let icon = new St.Widget({
+            layout_manager: layout,
+            style_class: 'app-folder-icon',
+            x_align: Clutter.ActorAlign.CENTER,
+        });
         layout.hookup_style(icon);
         let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size);
         let scale = St.ThemeContext.get_for_stage(global.stage).scale_factor;